import 'package:mall/core/models/user_invited.dart';
import 'package:json_annotation/json_annotation.dart';

part 'user_renew_list.g.dart';

@JsonSerializable()
class UserRenewList {
  final User userInfoItem;
  final String curBusinessType;
  final Map<String, String> businessTypeOptions;
  final List<Renew> renewHistories;

  UserRenewList(
    this.userInfoItem,
    this.curBusinessType,
    this.businessTypeOptions,
    this.renewHistories,
  );

  factory UserRenewList.fromJson(Map<String, dynamic> json) => _$UserRenewListFromJson(json);

  Map<String, dynamic> toJson() => _$UserRenewListToJson(this);
}

@JsonSerializable()
class Renew {
  final String businessName;
  final String businessLevel;
  final String amount;
  final String createTime;

  Renew(
    this.businessName,
    this.businessLevel,
    this.amount,
    this.createTime,
  );

  factory Renew.fromJson(Map<String, dynamic> json) => _$RenewFromJson(json);

  Map<String, dynamic> toJson() => _$RenewToJson(this);
}
